<template>
  <Container class="fund-check-info">
    <!-- 基础设置 -->
    <div class="container-header title title-center" slot="header">
      积分审核明细
      <Button
        size="large"
        class="fl btn-back"
        icon="ios-arrow-back"
        @click="jumpPrevPage"
      >返回</Button>
    </div>
    <homeTable
      :list="list"
      :translate="-50"
      @getData="getData"
      @onPageSizeChange="onPageSizeChange"
      @onPageChange="onPageChange"
      @onSelectionChange="onSelectionChange"
    />
  </Container>
</template>
<script>
  import homeTable from '@/components/homeTable'
  import DealerPointCheckInfoData from './info/DealerPointCheckInfoData'

  export default {
    name: '',
    components: {
      homeTable
    },
    data() {
      return {
        form: {
          cardz: [],
          cardf: [],
          yyzz: []
        },
        list: DealerPointCheckInfoData
      }
    },
    created() {
      this.getData()
    },
    methods: {
      jumpPrevPage() {
        this.$router.back()
      },
      getData() {
        this.productIds = []
        this.list.status = 'loading'
        let param = {
          current: this.list.currentPage,
          size: this.list.pageSize
        }
        this.$ajaxGet(`/distributor/integral/month_audit/view/${this.$route.query.id}`, param).then(data => {
          this.list.data = []
          this.list.data = (data || []) 
          this.list.status = 'pass'
        })
        .catch(() => {
          this.list.status = 'error'
        })
      },
      onPageChange(number) {
        this.list.currentPage = number
        this.getData()
      },
      onPageSizeChange(pageSize) {
        this.list.currentPage = 1
        this.list.pageSize = pageSize
        this.getData()
      }
    }
  }
</script>